/*
package org.itboys.mobile.controller.web;

import org.itboys.commons.CommonConstants;
import org.itboys.commons.dto.ResultPageDOHelper;
import org.itboys.commons.utils.ajax.AjaxUtils;
import org.itboys.framework.query.JsonPageUtils;
import org.itboys.framework.spring.controller.BaseController;
import org.itboys.mobile.common.SundayCommonConstants;
import org.itboys.mobile.entity.mongo.SundayActivity;
import org.itboys.mobile.entity.mongo.SundayApply;
import org.itboys.mobile.entity.mongo.SundayFloorMr;
import org.itboys.mobile.service.mongo.web.SundayFloorMrService;
import org.itboys.mobile.util.ResponseMessage;
import org.itboys.param.PageResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

*/
/**
 * @Author：贾琦磊
 * @Date：2018/7/17
 * @Description：楼先生管理
 *
 * 废除--2018年8月3日14:42:16
 *//*

@Controller
@RequestMapping("/sunday/web/floorMr")
public class SundayFloorMrController extends BaseController{
    @Autowired
    private SundayFloorMrService floorMrService;

    @RequestMapping("/index")
    public String index(HttpServletRequest request, HttpServletResponse response){
            return "sunday/floorMr/index";
    }
    @RequestMapping("/input")
    public String input(HttpServletRequest request, HttpServletResponse response,
                        @RequestParam("id")Long id,
                        Model model){
        try {
            model.addAttribute("floorMr",floorMrService.getById(id));
            return "sunday/floorMr/input";
        } catch (Exception e) {
            String msg = "";
            if (e.getClass().getSimpleName().equalsIgnoreCase("ErrorException")) {
                msg = e.getMessage();
            } else {
                msg = CommonConstants.ERROMSG;
                logger.error("/sunday/web/floorMr/input------" + e.getMessage());
            }
            e.printStackTrace();

            ResponseMessage.error(CommonConstants.FAIL_CODE,msg);
        }
        return "sunday/activity/error";
    }
    @RequestMapping("/select")
    public void select(HttpServletRequest request, HttpServletResponse response){
        try {
            PageResult<SundayFloorMr> result = floorMrService.select(request);
            JsonPageUtils.renderJsonPage(result.getTotal(),result.getData(),response);
        } catch (Exception e) {
            e.printStackTrace();
            AjaxUtils.renderJsonporJson(response, null,
                    ResultPageDOHelper.getMsgCodeResultDO(CommonConstants.FAIL_CODE, CommonConstants.FAIL));
        }
    }
    @RequestMapping("/save")
    public void save(HttpServletRequest request,HttpServletResponse response
    ,@RequestParam("id")Long id
    ,@RequestParam("question")String question
    ,@RequestParam("answer")String answer
    ,@RequestParam("title")Long titleId){

        try {
            floorMrService.save( id, question,answer,titleId);
            ResponseMessage.success();
        } catch (Exception e) {
            e.printStackTrace();
            ResponseMessage.error(CommonConstants.FAIL_CODE,"error");
        }
    }

    @RequestMapping("/delete")
    public void delete(HttpServletRequest request,HttpServletResponse response
    ,@RequestParam("id")Long id){
        try {
            floorMrService.delete(id);
            ResponseMessage.success();
        } catch (Exception e) {
            e.printStackTrace();
            ResponseMessage.error(CommonConstants.FAIL_CODE,"error");
        }
    }
}
*/
